interface Demo{
    length: number;
}
// 泛型T必须是MyInter的⼦类，即：必须拥有length属性
function test<T extends Demo>(arg: T): number{
    return arg.length;
}
test('123')
test({name:'张三',length:10})
